package com.kgc.scd.service;

import com.kgc.scd.util.RequestResult;
import com.kgc.scd.vo.SensitiveWord;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * Created On : 2022/11/18.
 * <p>
 * Author : 刘慧枫
 * <p>
 * Description: SensitiveWordService
 */
@FeignClient(value = "wyyxmall-lhf-server")
public interface WebSensitiveWordService {

    /**
     * @author : zhukang
     * @date   : 2022/11/12
     * @param  : [java.lang.String]
     * @return : com.kgc.sbt.util.RequestResult<java.lang.String>
     * @description : 测试搜索中的敏感词
     */
    @GetMapping("/testSensitiveWord")
    RequestResult<String> testSensitiveWordUseFeign(@RequestParam("searchKey") String searchKey);

    /**
     * @author : zhukang
     * @date   : 2022/11/12
     * @param  : [java.lang.String]
     * @return : com.kgc.sbt.util.RequestResult<java.lang.String>
     * @description : 测试添加敏感词，并将敏感词同步到redis中，也可以作为系统敏感词初始化功能
     */
    @PostMapping("/addSensitiveWord")
    RequestResult<String> addSensitiveWordUseFeign(@RequestParam("tid") Integer tid, @RequestParam("word") String word);
}
